package ooday05;
//枚举的演示
public class EnumDemo {
    public static void main(String[] args) {
        Season s = Season.SPRING;
        System.out.println(s.getSeasonName()+","+s.getSeasonDesc());
        Season[] seasons = Season.values();
        for (int i = 0; i<seasons.length;i++){
            System.out.println(seasons[i]);
            System.out.println(seasons[i].getSeasonName()+"很"+seasons[i].getSeasonDesc());
        }

        Season season = Season.AUTUMN;
        System.out.println(season.getSeasonName()+","+season.getSeasonDesc());
        switch (season){
            case  SPRING:
                System.out.println("天气"+season.getSeasonDesc()+"去放风筝");
                break;
            case SUNMMER:
                System.out.println("天气"+season.getSeasonDesc()+"去游泳");
                break;
            case AUTUMN:
                System.out.println("天气"+season.getSeasonDesc()+"去摘水果");
                break;
            case WINTER:
                System.out.println("天气"+season.getSeasonDesc()+"去堆雪人");
                break;
        }
    }
}
